# 合同观察者模型
class ContractObserver < ActiveRecord::Observer
  observe Contract

  def before_save record
    record.recheck_time = record.valid_end - record.contract_type.recheck_time.day
  end

end
